<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>后台管理</title>
    <!-- Bootstrap core CSS -->
    <link href="asserts/css/bootstrap.min.css" th:href="@{/webjars/bootstrap/4.4.1-1/css/bootstrap.css}" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link th:href="@{/asserts/css/dashboard.css}" rel="stylesheet">
    <link th:href="@{/iconfont/iconfont.css}" rel="stylesheet">
    <style type="text/css">

        @-webkit-keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        @keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

    </style>
</head>

<body>
<!--引入抽取的topbar-->
<!--模板名：会使用thymeleaf的前后缀配置规则进行解析-->
<div th:replace="commons/bar::topbar"></div>

<div class="container-fluid">
    <div class="row">
        <!--引入侧边栏-->
        <div th:replace="commons/bar::#sidebar(activeUri='emps')"></div>

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <div class="form-group">
                <label>姓名</label>
                <input  type="text" class="form-control" placeholder="zhangsan" th:value="${emp.name}">
            </div>
            <div class="form-group">
                <label>性别</label><br/>
                <label>
                    <select class="form-control" >
                        <option th:text="男"></option>
                        <option th:text="女"></option>
                    </select>
                </label>
            </div>
            <div class="form-group">
                <label>年龄</label><br/>
                <input  id="age" type="text" class="form-control" placeholder="35" th:value="${emp.age}">
            </div>
            <div class="form-group">
                <label>生日</label>
                <input  type="date" class="form-control" placeholder="1999-02-15" th:value="${#dates.format(emp.birthday, 'yyyy-MM-dd')}">
            </div>
            <div class="form-group">
                <label>身份证号</label>
                <input  id="IDCard" type="text" class="form-control" placeholder="" th:value="${emp.IDCard}">
            </div>
            <div class="form-group">
                <label>婚姻状况</label>
                <select class="form-control" >
                    <option th:text="已婚"></option>
                    <option th:text="未婚"></option>
                    <option th:text="离异"></option>
                </select>
            </div>
            <div class="form-group">
                <label>民族</label>
                <!--提交的是民族的id-->
                <select class="form-control" >
                    <option th:selected="${nation.id == emp.nationId}" th:value="${nation.id}" th:each="nation:${nations}" th:text="${nation.name}"></option>
                </select>
            </div>
            <div class="form-group">
                <label>籍贯</label>
                <input  type="text" class="form-control" placeholder="" th:value="${emp.nativePlace}">
            </div>
            <div class="form-group">
                <label>邮箱</label>
                <input  type="email" class="form-control" placeholder="zhangsan@163.com" th:value="${emp.email}">
            </div>
            <div class="form-group">
                <label>联系电话</label>
                <input  type="text" class="form-control" placeholder="" th:value="${emp.phone}">
            </div>
            <div class="form-group">
                <label>联系地址</label>
                <input  type="text" class="form-control" placeholder="" th:value="${emp.address}">
            </div>
            <div class="form-group">
                <label>所属部门</label>
                <!--提交的是部门的id-->
                <select class="form-control" >
                    <option th:selected="${dept.id == emp.deptId}" th:value="${dept.id}" th:each="dept:${depts}" th:text="${dept.name}"></option>
                </select>
            </div>
            <div class="form-group">
                <label>职位</label>
                <!--提交的是职位的id-->
                <select class="form-control" >
                    <option th:selected="${position.id == emp.posId}" th:value="${position.id}" th:each="position:${positions}" th:text="${position.name}"></option>
                </select>
            </div>
            <div class="form-group">
                <label>学历</label>
                <select class="form-control" >
                    <option th:text="博士"></option>
                    <option th:text="硕士"></option>
                    <option th:text="本科"></option>
                    <option th:text="大专"></option>
                    <option th:text="高中"></option>
                    <option th:text="初中"></option>
                    <option th:text="小学"></option>
                    <option th:text="其他"></option>
                </select>
            </div>
            <div class="form-group">
                <label>毕业院校</label>
                <input  type="text" class="form-control" placeholder="" th:value="${emp.school}">
            </div>
            <div class="form-group">
                <label>入职日期</label>
                <input  type="date" class="form-control" placeholder="" th:value="${#dates.format(emp.edate, 'yyyy-MM-dd')}">
            </div>
            <div class="form-group">
                <label>在职状态</label>
                <select class="form-control" >
                    <option th:text="在职"></option>
                    <option th:text="离职"></option>
                    <option th:text="试用期"></option>
                </select>
            </div>
            <div class="form-group">
                <label>工号</label>
                <input  type="text" class="form-control" placeholder="必填" th:value="${emp.workID}">
            </div>
            <div class="form-group">
                <label>转正日期</label>
                <input  type="date" class="form-control" placeholder="" th:value="${#dates.format(emp.conversionTime, 'yyyy-MM-dd')}">
            </div>
            <div class="form-group">
                <label>工龄</label>
                <input  type="text" class="form-control" placeholder="" th:value="${emp.workAge}">
            </div>
            <div class="form-group">
                <label>离职日期</label>
                <input  type="date" class="form-control" placeholder="" th:value="${#dates.format(emp.notWorkDate, 'yyyy-MM-dd')}">
            </div>
            <div class="form-group">
                <label>审核状态</label>
                <select class="form-control" >
                    <option th:text="通过"></option>
                    <option th:text="审查中"></option>
                    <option th:text="废弃"></option>
                    <option th:text="起草"></option>
                </select>
            </div>
            <div class="form-group">
                <label>更新时间</label>
                <<input  id="time" type="text" class="form-control" placeholder="" th:value="${#dates.format(emp.updatetime, 'yyyy-MM-dd')}">
                <script>
                    Date.prototype.format = function (fmt) {
                        var o = {
                            "y+": this.getFullYear, //年
                            "M+": this.getMonth() + 1, //月份
                            "d+": this.getDate(), //日
                        };
                        if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
                        for (var k in o)
                            if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
                        return fmt;
                    }
                    document.getElementById('time').value = (new Date()).format('yyyy-MM-dd');
                </script>
            </div>
            <a th:href="@{/emps}" class="btn btn-info" role="button">返回</a>
        </main>
    </div>
</div>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" th:src="@{/webjars/jquery/3.5.0/jquery.js}"></script>
<script type="text/javascript" th:src="@{/webjars/popper.js/1.14.3/dist/popper.js}"></script>
<script type="text/javascript" th:src="@{/webjars/bootstrap/4.1.1-1/js/bootstrap.js}"></script>

</body>

</html>